package com.lu.common.listener;

import com.lu.common.task.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class ScheduleJobInitListener implements CommandLineRunner{

    @Autowired
    TaskService taskService;

    @Override
    public void run(String... args) throws Exception {
        System.out.println("ScheduleJobInitListener");
        taskService.initSchedule();
    }

}
